package main

import (
	"fmt"
	"strings"
)

func minSonStr(s string) int {
	if len(s) < 2 {
		return len(s)
	}
	end := ""
	for i := 0; i < len(s)-1; i++ {
		tmp := string(s[i])
		for k := i + 1; k < len(s); k++ {
			if strings.Contains(tmp, string(s[k])) || string(s[i]) == string(s[k]) {
				break
			}
			tmp += string(s[k])
		}
		if len(tmp) > len(end) {
			end = tmp
		}
	}
	return len(end)
}

func main() {
	//s := "aaa"
	//s := " "
	//s := " a "
	//s := "abcabcbb"
	s := "pwwkew"
	L := minSonStr(s)
	fmt.Println(L)
}
